class BasePanel extends BaseComponent{
	public constructor(index:number,fixedWidth:boolean=true) {
		super(index);
		if(fixedWidth){
			this.top=this.bottom=this.left=this.right=0;
		}
		OpenDataUtil.postMessage(this.index);
	}
	public addToParent(parent:eui.UILayer=GameLayer.getInstance().panelLayer){
		parent.addChild(this);
	}
	public removeFromParent(parent:eui.UILayer=GameLayer.getInstance().panelLayer){
		if(parent.contains(this)){
			parent.removeChild(this);
		}
	}
}